import { setProductPrice } from '~/common'
export const defaultListColumns = [
  {
    width: '50',
    type: 'selection'
  },
  {
    width: '150',
    prop: 'productCode',
    label: '产品编码'
  },
  {
    width: '200',
    prop: 'productName',
    label: '产品名称（中）',
    'show-overflow-tooltip': true
  },
  {
    width: '150',
    prop: 'productLineName',
    label: '产品线'
  },
  {
    'min-width': '100',
    prop: 'attribute1',
    label: '规格',
    'show-overflow-tooltip': true
  },
  {
    'min-width': '100',
    prop: 'attribute1',
    label: '型号',
    'show-overflow-tooltip': true
  },
  {
    width: '150',
    prop: 'attribute5',
    label: '条形码'
  },
  {
    width: '100',
    prop: 'productUnitName',
    label: '单位'
  },
  {
    'min-width': '100',
    prop: 'referencePrice',
    label: '参考单价（元）',
    formatter: row => setProductPrice(row.referencePrice)
  }
];

export const surgeryListColumns = [
  {
    type: 'selection'
  },
  {
    prop: 'productCode',
    label: '产品编码'
  },
  {
    prop: 'productName',
    label: '产品名称（中）'
  },
  {
    prop: 'enproductName',
    label: '产品名称（英）'
  },
  {
    prop: 'barCode',
    label: '条形码'
  },
  {
    prop: 'productUnit',
    label: '单位'
  },
  {
    prop: 'manufacturer',
    label: '生产厂商'
  },
  {
    prop: 'productPrice',
    label: '参考单价（元）'
  }
];

export const consumeListColumns = [
  {
    type: 'selection'
  },
  {
    prop: 'productCode',
    label: '产品编码'
  },
  {
    prop: 'productName',
    label: '产品名称（中）'
  },
  {
    prop: 'productUnit',
    label: '单位'
  },
  {
    prop: 'barCode',
    label: '批号'
  },
  {
    prop: ' inventory',
    label: '库存量'
  },
  {
    prop: ' occupy',
    label: '占有量'
  },
  {
    prop: ' availableCount',
    label: '可用量'
  },
  {
    prop: 'inDate',
    label: '有效期'
  }
];
